//this is user-defined hear file to contain user defined function prototypes
//1. Programmer: Nguyen xuan Hoai
//2. Purpose of function: checking if an year is a leap year
//3. Parameter: an year in unsigned int format
//4. Exception: None
//5. Algorithm: leap year if divisible by 100 must devisible by 400; otherwise divisible by 4
#include "leap.h" 

int leap_year(unsigned int y)
 {
 
    if (y%100==0)
      if (y%400==0)
		  return 1;
	  else
		return 0;
	else
	  if (y%4==0)
		  return 1;
	  else
		  return 0;
 }
